// 引入Navigate组件，用来设置默认跳转，
import { Navigate } from "react-router-dom";
import Mylayout from "../layout/Mylayout";
import Login from "../components/Login";

import menus from "./children";

const routes = [
    {
        path:'/',
        element:<Navigate to='/login'></Navigate>
    },
    {
        path:'/',
        element:<Navigate to='/home'></Navigate>
    },
    {
        path:'/home',
        element:<Mylayout></Mylayout>,
        children:[
            ...menus
        ]
    },
    {
        path:'/login',
        element:<Login></Login>
    }
]

export default routes